package com.shyroke.daydayzhuanapi.mapper;

import com.shyroke.daydayzhuanapi.dto.InviteImgAdminDto;
import com.shyroke.daydayzhuanapi.entity.InviteImgEntity;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class InviteImgMapper {

    @Autowired
    private ModelMapper modelMapper;

    public InviteImgAdminDto entityToDto(InviteImgEntity e) {
        return modelMapper.map(e, InviteImgAdminDto.class);
    }

    public InviteImgEntity dtoToEntity(InviteImgAdminDto dto) {
        return modelMapper.map(dto, InviteImgEntity.class);
    }
}
